#ifndef SETUPSERIAL_H
#define SETUPSERIAL_H

#include <QDialog>
#include "serialworks.h"

namespace Ui {
class SetupSerial;
}

class SetupSerial : public QDialog
{
    Q_OBJECT

public:
    explicit SetupSerial(Serialworks *work, QString com,int bitrate,int parity,QDialog *parent = 0);
    ~SetupSerial();

    QString comName() const {return _com;}
    int     Bitrate() const {return _bitrate;}
    int     Parity()  const {return _parity;}

signals:
    void signal_com_param(QString com,int bitrate,int parity);

private slots:
    void on_btnOk_clicked();

    void on_btnCancel_clicked();

private:
    Ui::SetupSerial *ui;
    QString _com;
    int     _bitrate;
    int     _parity;
    bool    _isChanged;
    Serialworks *m_works;
};

#endif // SETUPSERIAL_H
